package cn.ck.service.impl;

import cn.ck.common.RabbitMqConstant;
import cn.ck.service.RabbitMessageService;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * @title :   RabbitMq 接口实现类
 * */
@Service("rabbitMessageService")
public class RabbitMessageServiceImpl implements RabbitMessageService {

    @Autowired
    private AmqpTemplate rabbitTemplate;


    /**
     * @title : 发送接口
     * */
    public void send(String message){
        rabbitTemplate.convertAndSend(RabbitMqConstant.mq_key_hello, message);
    }


}
